package control;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;

import view.CustomerDetailJPanel;
import view.LibraryMainJFrame;
import view.components.Icons;

@SuppressWarnings("serial")
public class NewCustomerAction extends AbstractAction {
	private LibraryMainJFrame mainFrame;
	
	public NewCustomerAction(LibraryMainJFrame frame) {
		super("Neuer Kunde", Icons.CUSTOMER_ADD);
		putValue(MNEMONIC_KEY, KeyEvent.VK_N);
		mainFrame = frame;
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		mainFrame.openContentPanel(new CustomerDetailJPanel(mainFrame));
	}

}
